<template>
  <view class="container">
    <view class="automation_header">
      <view class="automation_header_left">自动化 </view>
      <img
        src="@/static/automation/plus-circle.png"
        class="automation_header_right"
        alt=""
        @click="onAddPlan"
      />
    </view>

    <view v-if="planList.length === 0">
      <view class="no_data">
        <img
          src="@/static/automation/auto_bc.png"
          class="auto_bcPng"
          alt=""
          srcset=""
        />

        <view class="no_data_text">根据天气，设备，时间等条件，自动执行</view>
      </view>
    </view>
  </view>
</template>
  
<script>
export default {
  components: {},
  data() {
    return {
      // 页面参数
      options: {},

      //   计划列表
      planList: [],
    };
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad(options) {},

  /**
   * 生命周期函数--监听页面显示
   */
  onShow() {},

  methods: {
    onAddPlan() {
      console.log("添加");

      uni.navigateTo({
        url: "/pages/automationConfig/addConfig/index",
        success() {
          console.log("跳转成功");
        },
        fail(e) {
          console.log("跳转失败",e);
        },
      });
    },
  },
};
</script>
  
<style lang="scss" scoped>
.container {
  position: relative;
  background: rgba(246, 247, 251, 1);
  height: 100%;
  padding: 25.568rpx;

  .automation_header {
    display: flex;
    justify-content: space-between;
    align-items: center;

    .automation_header_left {
      font-family: "Microsoft YaHei";
      font-size: 30.682rpx;
      font-weight: 400;
      line-height: 40.5rpx;
      text-align: left;
      color: rgba(0, 0, 0, 1);
      border-bottom: 3px solid rgba(96, 164, 247, 1);
      padding-bottom: 8.523rpx;
    }

    .automation_header_right {
      width: 64.773rpx;
      height: 64.773rpx;
    }
  }
}

.no_data {
  width: 100%;
  //   上下居中
  position: absolute;
  top: 30%;
  transform: translateY(-50%);
  //   居中
  text-align: center;
  left: 50%;
  transform: translateX(-50%);
}
.auto_bcPng {
  width: 192.051rpx;
  height: 131.148rpx;

  opacity: 0.5px;
}

.no_data_text {
  font-family: "Microsoft YaHei";
  font-size: 25.568rpx;
  font-weight: 400;
  line-height: 33.75rpx;
  text-align: center;
  color: rgba(142, 142, 142, 1);
  margin-top: 10px;
}
</style>
  